package com.example.tourpal.model;

import java.io.Serializable;
import java.util.List;

public class Journey implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5436445242743240129L;
	private String destination;
	private String endTime;
	private Integer id;
	private int ispublic;
	private String name;// Journey name
	private List<Plan> plans;
	private int praiseNum;
	private String startTime;
	private User user;
	private Integer delFlg = 1;
	
	public Journey() {
	}

	public Journey(String destination, String endTime, int ispublic,
			String name, List<Plan> plans, int praiseNum, String startTime) {
		super();
		this.destination = destination;
		this.endTime = endTime;
		this.ispublic = ispublic;
		this.name = name;
		this.plans = plans;
		this.praiseNum = praiseNum;
		this.startTime = startTime;
		// this.user = user;
	}

	
	
	public Integer getDelFlg() {
		return delFlg;
	}

	public void setDelFlg(Integer delFlg) {
		this.delFlg = delFlg;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getDestination() {
		return destination;
	}

	public void setDestination(String destination) {
		this.destination = destination;
	}

	public String getEndTime() {
		return LocalDataLoaderHelp.shortTime(endTime);
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public int getIspublic() {
		return ispublic;
	}

	public void setIspublic(int ispublic) {
		this.ispublic = ispublic;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Plan> getPlans() {
		return plans;
	}

	public void setPlans(List<Plan> plans) {
		this.plans = plans;
	}

	public int getPraiseNum() {
		return praiseNum;
	}

	public void setPraiseNum(int praiseNum) {
		this.praiseNum = praiseNum;
	}

	public String getStartTime() {
		return LocalDataLoaderHelp.shortTime(startTime);
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	@Override
	public String toString() {
		return "Journey [destination=" + destination + ", endTime=" + endTime
				+ ", id=" + id + ", ispublic=" + ispublic + ", name=" + name
				+ ", plans=" + plans + ", praiseNum=" + praiseNum
				+ ", startTime=" + startTime + ", user=" + user + ", delFlg="
				+ delFlg + "]";
	}
}
